package com.mpsc.singleton.demo.handler.taskhandler;

import com.mpsc.singleton.demo.common.BaseResponse;
import com.mpsc.singleton.demo.handler.BaseHandler;
import com.mpsc.singleton.demo.handler.BaseHandlerRequest;
import org.springframework.stereotype.Component;

@Component("TaskHandler")
public class TaskHandler implements BaseHandler<BaseHandlerRequest> {

    @Override
    public BaseResponse execute(BaseHandlerRequest request) {
        try {
            Thread.sleep(20000);
        } catch (Exception e) {

        }
        System.out.println("异步调用完成！");

        return new BaseResponse();
    }
}
